var EasyFTP = require('easy-ftp');

var ftp = new EasyFTP();
var config = {
    host: '116.10.184.230',
    port: 21,
    username: 'tv_ailipai',
    password: 'm57aJk3BfYwfkfNy',
    type : 'ftp'
};
ftp.connect(config);

ftp.on("open",function (client) {
    console.log("open !")

    ftp.upload("D:\\ff_test\\out\\1\\1080p\\**", "/tv/368/1/1080p/", function(err){
        if (err){
            console.log("上传失败！")
        }else {
            console.log("上传成功！")
        }
    });
});
ftp.on("upload",function (uploadedRemotePath) {
    console.log("upload : "+uploadedRemotePath)
});
